﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Orders.aspx.cs" Inherits="Orders" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:EntityDataSource ID="EntityDataSourceCust" runat="server" 
            ConnectionString="name=NorthwndEntitiesCnn" 
            DefaultContainerName="NorthwndEntitiesCnn" EnableFlattening="False" 
            EntitySetName="Customers"
            Where="it.CustomerID=@custId"
            Include="Orders">
            <WhereParameters>
                <asp:QueryStringParameter 
                QueryStringField="custId"
                Name="custId"
                DbType="String"/>
            </WhereParameters>
        </asp:EntityDataSource>
    
        <asp:DetailsView ID="DetailsViewCust" runat="server" 
            DataSourceID="EntityDataSourceCust" Height="50px" 
            ondatabound="DetailsViewCust_DataBound" Width="125px" 
            AutoGenerateRows="False" DataKeyNames="CustomerID">
            <Fields>
                <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" 
                    ReadOnly="True" SortExpression="CustomerID" />
                <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" 
                    SortExpression="CompanyName" />
                <asp:BoundField DataField="ContactName" HeaderText="ContactName" 
                    SortExpression="ContactName" />
                <asp:BoundField DataField="ContactTitle" HeaderText="ContactTitle" 
                    SortExpression="ContactTitle" />
                <asp:BoundField DataField="Address" HeaderText="Address" 
                    SortExpression="Address" />
                <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
                <asp:BoundField DataField="Region" HeaderText="Region" 
                    SortExpression="Region" />
                <asp:BoundField DataField="PostalCode" HeaderText="PostalCode" 
                    SortExpression="PostalCode" />
                <asp:BoundField DataField="Country" HeaderText="Country" 
                    SortExpression="Country" />
                <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" />
                <asp:BoundField DataField="Fax" HeaderText="Fax" SortExpression="Fax" />
            </Fields>
        </asp:DetailsView>
        <br />
        <asp:GridView ID="GridViewOrders" runat="server">
        </asp:GridView>
    
        
        <br />
    
        
        <br />
    
        
    </div>
    </form>
</body>
</html>
